refactor more functionality into shared space...