Basic API laid out. Untested and probably buggy as all hell