Document some parts
Optimize some functions
Update version system
Make some elements const