Adjust unit tests and clean up templates