Fixed bugs, added data polishing scripts, streamlined main