Added tests for object top level and fixed corresponding bugs.