Trying to get this merged again.

@hectron, can you take a look?