Rearranged code, Add new main manifest loading