Move all matching code to a seperate module