yaml files extension fixed. Minor index.php changes
Small template rendering code refactoring