draw refactoring. Work in progress.