Arrows and a little refactoring