Merged commits regarding the am_scheduler