Some tweaks and cleanup