Code fixes after review