Changed create_task to use kwargs
Code cleanup, styling, and commenting.
Bugfix