Refactor css and tests