Removed dead code, updated comments