fixed multiple endpoints in order to handle json and multipart

requests. Name refactoring.
took care of lots of edge cases. needs even more testing.
cleanup. some refactoring
Merge branch 'email_service_json'