Added missing functionality from Main