Cheryy picked some commits from TeamEOS