Changed layout to singleton pattern