c: Fix prefix for constants in documentation
c: Refactor common code
Refactor more common code