Executed numerous minor refactorings