Moved task queue code to one place
Added semicolon
Re-add whitespace to files that I didn't modify