Reorganized code a bit, added more timed tasks