Updated Main Controller