Fixed style issues; removed whitespace on empty lines and moved levenshtein function to tools.js