Implement tests and more grammar