Reengenieering of code.

Simple Execution Flow added (start and stop script when user requests).