Some more commits, doesn't quite work right, a lot more is done though