Assignment4 refactored canvas