remove dead code, add comments

Signed-off-by: Cristian Stoica <crististm@gmail.com>