Added sum-samples and some minor cleanup.