main() function added

Less crappy and more user friendly