fixed bug with codegenerating and changed layout a bit