Cleaned up code in search classes