Integrating testing into master

Currently can't merge; creating pull-request for documentation. Will fix merge conflicts locally.