Merge samples Engine.* files into Sample.*.
Moved all input handling to sample framework.