Unused code removed, comments added