Manage maintenance refactoring

Hopefully nothing is broken this time...

Maybe someone else can prettify the function docs, my english is still horrible  :P