JSHinted and repaired to fix errors found during process.