Refactor: remove Classes.hs to avoid cycle