cleanup and code review