Reorganize project with requirejs which can now be used for template loading