Commented more of Main, not completely finished