Stroke class tests and refactoring.