added swift singleton and other snippets