clean up main to look less horrible