removed bpi variable, except for one questionable line (318). will follow up with Nick. fixes #17