moved dimensions into template parameters

Still need to move functions to header files.
refactored to move all templates definitions to header files
successful unit tests
Merge branch 'template-kernels'