Fixed checking for elements alreading in tree. Made insert tests.