README and comments added, swapping calls testable