added css
organized code
changed main template