Proper namespace constants.
Change in namespace prefixes to use constants.
Format and code style fixes acording to code review.
Restpre AutoDiscovery::handle with tests.