Updated version. Moved direction state names to ID constants. Closes #78.