Added some more functionality to the insert method and some more tests