Fixes resulting from code review