Unit-tested version of assignment #2
Removed commented out lines for better readability