Fixing some things and documenting the module