Api update

I was meaning to polish this up more before throwing it out here, but damn the torpedoes, etc.