Started integrating states
Added a Rect class, inspired from rxi