Added feature to optionally enforce singleton behaviour