Further #defines, less magic numbers
Update documentation relevant to last commit