Small fixes and code review