Compiler detection and Singleton.

Adding partial compiler detection which need to be completed and
creating the singleton pattern.