Misc changes to code

Still works!