Added some more tests, fixed select instance by id