Add units preference (fix #7)