The center--focus problem and small amplitude limit cycles in rigid systems