Implemented profile API
Refactored test data to use functions so that each test gets their own copy of the data
Added tests and implemented more profile related API