Moved Sector to inherit from Entity.

I also changed most of the code (all that I could find) to use Sector.name instead of Sector.id. I tested it and it works fine so far.