Fixed all warnings in debug and release modes.