Drastically changed the printing method in an effort to make the code more manageable. Still contains a minor formatting problem.