More warning fixes and Lua Template Fix.