Lots of improvements, cleaning up