adding baseUrl and urlFor to connection. Fixing bug in database functions where the reference and notifiers were passed incorrectly to SC.Request