Added some pseudo-code and laid out method/class structure.