Work in progress major refractoring