Created commands.js for command related functions. Also added edit distance calculation for error correction.