fixes to commit 62d1cc0. whitespace and clearing unused vars