Cleanup and bug fixes

- Moved templates into seperate files
- Fixed checking of todos