remove warnnings, and add -Wall to compilation flags