Organise Mongoid model into a tree structure