Rename a couple of functions, remove extra whitespaces, remove useless code