Fixed some things and warnings