Implemented more type handling
tests
auto-merge staging into master