Parameter comments, createWindow
1) New function for window and canvas creation
2) Grouped related parameters and added comments