pep8 fixes, and added new medium relationships.
Added indexing for WPC MB entity gids.