Coding style: Declare before used and add function comments
Coding style: Declare before used
Coding style: Bad line breaking before logical operators