Replace custom data structures with ardent