Refactoring:
* Renamed some locals
* Applied code style