initial commit, will probably end in a complete re-write of API wrapper