Move drawing logic to drawers

Close #1106.
This will need to test undefined, null, NaN etc.