Organized program

Made things look nicer, and freed up memory leaks.