fix issue 60

i) fix issue 60
ii) a minor fix on exporting blank snapshot data.
iii) cleanup unused code.