Week 6 Code implemented

LOTS!!! I know I should write better comments but I am tired and it has
been a long week and I'm not even done yet.