Removed pseudocode and updated documentation