Somewhat useful extensions written in Swift