Cleaned up separation of concerns.