Variable names and documentation corrected