* Code refactoring / formatting and block termination comments added