Fixed fee functions and added email script