Extracted out common code (moved to slim); added as submodule and updated references.