move Main to a separate module
Trying to make core more autonomous