Code maintenance: removed unused variables, fixed indentation, fixed
imports, add comments etc. etc.