code cleanup; comments