Fixed all warnings etc