refactored axes and grid logic to setup.coffee