Added solutions for 26-40, optimized some stuff, and moved main into its own file.