refactor structure and styles