A few improvements on https://code.google.com/p/pyenet/