added retrieval, delete and update of profiles
added more test cases
added a debug file for easy debugging outside of mocha