Even cleaner code of last commit (sorry)