Code discovery feature is now at more usable state.

Fixed code discovery. Only some minor features are left to be implemented.