Separated into library and example executable.