Improved the drawing system

Shape recognizer seems to work
Added some documentation