Reinventing the wheel with some persistence stuff