cleanup.
update resources.
move last code save to client.