Code generator: some minor refactoring (#409).
Code generator: some minor refactoring (#409).

nickerso/libcellml,nickerso/libcellml,cellml/libcellml,cellml/libcellml,hsorby/libcellml,nickerso/libcellml,hsorby/libcellml,cellml/libcellml,hsorby/libcellml,cellml/libcellml,nickerso/libcellml,hsorby/libcellml