add docs and fix some styles