Fix #31 by adding getVersion() function
Fix #30 by ensuring isSingleton() cannot throw an exception