Some code cleanup.

Signed-off-by: ichbin <ichbin@ichbin.us>