improve code quality, doc and metadata