Made changes to main.