Initial commit of something that (kind of) works!

Note: implementation is ugly