Formatting. Added Logging. Renamed single variables.