Replace tabs by spaces, refactor singleton

There is some files with spaces, other with tabs. Following standard and advices, I push all with spaces.

Refactor singleton and protect against singleton cloning.