- simplified code
- added visualization interface