remove useless code and some renames following code review for #12