Quiet Hours: Clean up and consolidate code