code formatted
edited layout and separeted the templates into different files