- Extended non GUI API aka "toolAPI".
- Added unit tests, also for a bug.