Implemented Command design pattern.
Merged