Some preparations for further optimization