fixed narrowing warnings in unit tests
enabled -pedantic and -Wextra.  cleaned up the resulting errors