Initial commit of mostly broken code