Huge tinydb pointer refactoring (jaaay!!!)