Add main function and make others into its own classes