Added case to Direction class to avoid potential divide-by-zero errors.