Fixed all compile warnings related to unused variables