Moved some functionality to Main.cs

OOP design.

Signed-off-by: Ovidiu Gheorghe <pixeledsheep@gmail.com>