Changed file structure
Separated Logic from execution code