Initial commit of some code, not fully working