refactoring data model

I am now using namedtuples instead of classes