Adjusted code formatting for the zoom limit changes.
Added a check for min and max zoom levels that are < 0.