Another set of fixes after code review