Code cleanup and some comments
Add a canvas widget