Unit tests for character and direction, minor tweaks