Few codes and docs refactor