fixed stats, fixed file handles. Needs: cleanup UI, stats display