Refactored

Made some changes to main.
Merge branch 'Refactor'