big refactor to have this be way less crappy, most of the APIs are fairly solid