Implementation of modules

Not finished yet