Fixes and improvements

-Bug fixes
-Removed jQuery dependency
-Works with GET or POST
-Use promises instead of explicit callback