serverside code cleanup started