Add getType auxiliary function and use it everywhere
Clean dependencies in tests
Use getType in ArraySpec constructor
Expand ObjectSpec
Add tests for ObjectSpec