Clean up, small bug fixes