Refactor to Add basic template