refactor controler data and logic to be clearer
fix css bug