Fixed 2 important bugs (one of them was mentioned in milestone 2); added early support for multiple types of objects.