bug fixes and clean up

Fixed drawing routines/tested