Some changes/cleanup? in main