Factorize

Shorter, simple (lighter) code.

Note: This builds on #16