startet work for pull

- code cleanup
- add detailed comments
- write docu
- split between plugin and config/customs