Attempt to refactor...