Removed selection, added comment to a number of functions