Also bind relevant constants and define some object types and better argument names for the docs.
A general speedup should be apparent, with even more peformance increase when compiling optimized. WARNING: Tested and it seems to work, but if something breaks, please report.