fixes style and removes unneeded function