Updated style and added swap check