Added .jshintrc file for linting
Refactored some control logic into its own lib file
Added getusermedia example