Added main loop support

Deprecated all the previous demos and added main loop support and input
manager support.