Added better support for any object and more tests