Pseudocode added and final documentation started.