Added file headers, slight code adjustments.