Quick bugfixes and introduction of 'runtime' package for later use.
Fixed circular dependency.