Basic module fleshed out and cleaned