Move module classification logic into its class
Move data types into its own module
Implement `__lt__` instead of passing a key function