Made it understand dates better, moved test code to main.vala