Refactoring
Bugfix
Added basic type test cases. Test status: 22/6/0