Class not found fix and best practice for templating applied