Split out direction stuff into a module