Clean up

Separated binary files and source files, cleaned up/corrected build
scripts, generated documentation in new "doc" directory, corrected test
code.