Move swap function to tools
Add insertion test implementation