making scala modular