Re-adjusted main, types and ast derive typeable
We'll see tomorrow what happens, now I am too tired!