Moved main() to a separate file