First commit of some old code. Doesn't work for now.