Fixed encoding problems, added Command API