added -Wextra compiler flag, clean ups