Fixed some warnings

Fixed some warnings relating to the "abs" function, among other things