WIP: extracted a common viewable module from team and user models

Saw some duplicate code in team and user, so I extracted it.