Javadoc'ed and slightly tweaked (see email)