Fixed errors in spelling and code