Created constructor for Tasks
Split the code in both main-files to smaller pieces.
Forgot to add the event.cc. Few commits late!