add document. change module structure. remove deprecated functions.