Tidy up options variable passing
Tidy up debug and error handling. Add PSN username helper functions
Support POST requests too
Initial API file