Cleaned using JSLint