crichton refactoring: fixing discovery and associated specs

@jcarres-mdsol Please review. Yes, bunch of specs still failing. Will be fixed in next 2 PRs.
This branch is based on fixing_specs_lint #155 , so please merge it first.

Thanks.