almost done

removed a lot of unnesessary code. added back some drawing code and
only Rect remains to be added. need to fix samples and test.