Task scheduler, many other improvements and additions