Use Comparable interface

Fixes #14.