Line detector cleaned up