cleanup unused vars and JSHint issues