replace all the tuple of lists with objects.

makes it easier to swap backend and add more properties later
[subs] change indentation
[subs] pep8
[subs] refactor