refactoring and added css dependencies