Needs code cleanup