cleanup services code