major refactoring to store code in list of functions
Merge branch 'projectRefactoring'