made the css changes and refactored the code