Finalized the program itself. GUI is a jumble, though.