Added LP.swap and tests