First commit.

I'll separate everything into multiple files as soon as I know how to do that with LUA