Overhauled class structure to support better persistence