Using constant rather than repeating mime type; also added copyright header where missing
further rationalization of constants