Fix some errors in the refactored draw functions, add comment
docstrings to most defuns.