code cleanup & improved consistency