Found way to emulate singleton pattern in Swift