Fixed typos and incomplete refactoring

In the process of finalizing the build of 2013.4