Initial port from https://code.google.com/p/reduxcomputing-proximity