Implemented singleton and observer pattern