code cleanup run as service