Started refactoring of assembler generation and optimization of generated assembler code.