Some minor fixes in Engine class.
Focusing functions using smartpointers.