added lazy singleton functionality

all changes related to lazy singleton support now combined in one commit