Adjuste most of module core

Added some new tests and type classes. Also added some syntax
classes.