Fixed several minor issues detected during review