Nightmare cleaning code + some sleeping adjustments!