Removed unused vars and added -Wall for gcc