Changed api urls, cleaned code a little
Merge remote-tracking branch 'origin/master'