Need to include sys/time.h.

We need to include sys/time.h since we're using struct timeval.
Added ctags file to gitignore.
Fixed a bunch of compiler warnings.

These were mostly caused by unused variables, parameters, etc.