refactoring out css and script