cleanup of some drawing code. rects are now drawable via javascript