Code formatting fix.
Remove NewTaskWindow.
Simplify callbacks using some macros.