cleaned up sector.cpp