Removed commented code, cleaned up templates