Runs with main; scheduler algo still needs tweaks