Remove useless returns and fix some code style