Bugfixes and added jshintrc file.