Refactoring the value handler into its own file