Cleaning up, some fixes