This file badly needs some documentation...