Some cleanup, (probably) working