Move general data structures to reusable package