Bug fixes and added singletons