Refactored into components some more