Better grid, fixed linker errors