Cleaned up code from Polig-Hellman Demonstration and added readability comments