A building occupied by a nonconforming use at the time of enactment of this ordinance or amendment thereto may be retained, except that it shall not be: A. Expanded, extended or enlarged in any manner which increase its nonconformity. B. Rebuilt, altered or repaired if such construction costs would exceed 50% of its replacement cost.