Fixed bugs. Added option to filter out restricted headers