introducing states, cleanup code, add sprite to star class