Refactoring

- code is more clear
- separation in diverse js prototypes