Initial changes, untested
Got something working