Shuffeled functions and names around... I don't know, should have committed months ago...