Code cleanup, ease debugging