Chain refactored into its own class