HRMI code: Make local functions static

Saves only 40 bytes but hey :)
Start documentation about hacking around the code