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 increases its non-conformity. B. Rebuilt, altered or repaired if such construction costs would exceed 50 percent of its replacement cost.