Consolidated source into a single file

Easier to read and avoids the Python version-specific import syntax.