small cleanup and variables rename