organized main.cpp; figuring out correct viewport