Starting to add swapper
Added swap direction detection
Refined swap mechanics