Fix various stylistic inconsistencies and documentation