Simplified code, but its not properly seeing the template...