Small UI fix in general settings and small code refactoring