Added tests for all available methods
Updated code style to fulfill jshint rules