Fixed typos and updated code

Change-Id: If58f914a13550803ed1fb0bff845288b6e654d92