Changed from using Singleton Pattern to Revealing Object Module Pattern for organising JavaScript code.