minor updates and code cleanup