Refactor css and events for board editing