Converting a linear tree (frontend) to tree data structure (backend) to nested sets (mysql) and back again.