Fixed Pranav's "Sync"

Pretty much reverted everything to its state before the "Sync" commit,
except I had to do it manually because of the commit merge. The code
compiles.