Update pseudocode, initl soon, and refactored