Fixed jshint errors and warnings which resulted in a number of bug fixes
version bump