corrected all compiler warnings that occured using -Wall