Implemented dialect
Cleaning up classes and fixing tests