Some refactoring, reformatting and integration tests (#4)* Some refactoring and reformatting* Add a syntax and a global config integration test