initial commit, untested code!

Code not tested, I recommend not using this yet.