Optimized templates some more
Added inherits index