split and packge core modules to ease testing