Fix style and remove useless function