template lookup strategies

1. Adds an "inner component" template lookup strategy
2. Refactors `templates.coffee` for readability