Replaced some empirically chosen numerical literals with consts
Removed unneeded helper functions from main
Made it so we can end the program or unit tests by closing the output window