Add Travis-CI build status.
Fix mac osx compiler error
Use effect instead of boolean flag
Remove unused variables
Rename updateCanvas -> drawCanvas