New and improved, now with one less bug and a lot more JavaDoc