Rewrote code for accessing the online store.

Currently testing on local machine before testing on remote server.