Working on pseudocode version
Small touchups