Finalized code. Still working on ensuring accurate handling of poor
user-input and corner cases.