cleans up code (tabs), adds tha hooks to page template