enum statemachine and some styling and somer ajax