- Rewrote type system

Added test cases