some refactoring.

Signed-off-by: C. Bouton <admin@cbouton.com>