Changed variable 'direction' to 'axis'
Fixed a typo
Codebook complete