Fix build warnings

Fixed all build warnings except one