code cleanup + code updates