major refactory, split between object and Moldy