Reorganized code into a separate static library target.
Treat warnings as errors.