Even more main cleanup