Add tests for TAP interfaces and refactor the code