imported various changes from the now deprecated optd repository.

all changes in this repository are automatically synced back to the old one. This has the side-effect that changes in the old repository will be overwriten! So all future development should happen in this new repository. I guess it is time to set the old repo to read-only..