Now 90% complete!

May or may not port to Lua in the future