Last commit was rather broken. This seems a bit more sane.