fixed null pointer errors and other bugs with headerDepth feature.
Added CSV metadata editor