Cleaned up and added comments. Added ability to connect to investigative realms.