Convert leap tool to use switch() case for Action