Remove unused variable

Also improve code formatting