On source run

Fixes for running from the sources and some other small stuff.