Fixes, adding template precompilation, resolving preprocessing issues