Code cleaning

A bit of code cleaning: removed old commented parts, removed unnecessary conditionals