A bunch of small changes. Not working yet, though