HW2 v3. Cleaned up more documentation and code.