Be conservative and cautious
Reset previousVal and improve classname handling
Merge pull request #27 from smfoote/cleanup

Be conservative and cautious