Removed -Wno-unused and compilation fixes