Code refactoring.
Added work with JSON.
Implemented "step" functionality.