Remove an unnecessary function
Adjust code style