Cleaning up; small bugs