Various little code snippets written in Swift