Finished implementing javascript functions (-error handling) & REST
interface 
Added map functionality