Documenting and regrouping functions + globals