Fixed some warnings and other things