First version of modular code.