More doubles and typed data

As per issue #2.