Move tests and support library to the project. Some work on the grid