Would be nice to refactor singleton instantiation.