Finalized main file