further refactoring

- rewritten file description comments
- added more ScriptDoc comments
- continued refactoring of the whole package