Refactor classes using Singleton Pattern

Affected classes that are refactored are Logic, MenuInterface,
RubberDuck and Parser.

All test classes are refactored as well but has not been tested yet.