Builder pattern for DefaultModule

This is to fix #184 .