Template cleanup
Added feature flags