split module lib from config

Closes #2