Reverted previous refactoring

Also fixed some typos