Got templates to work, added code from tutorial