Fix some errors and get drawing working