Linear

Branched version of #70.