refactoring, removed some functions, added new css.