code cleanup and naming