With regards your complaints, if you had received an appointment letter from the company then in that letter they must have stated your job description, if as per your job description it was stated that you are not required to code and they still made you code then they have breached your contract.
With regards the employee who passed derogatory remarks there is a clear case of defamation and you may chose either civil or criminal action.
As per the supreme court guidelines there has to be a mechanism for women with regards sexual harassment at workplace which protects women at workplace against lewd behaviour against them.
Fact that the senior management took no precaution for women employees you may take this up in court too as the Bombay High Court has dealt with a case regarding a female BPO employee who was raped and murdered as she was working a late night shift.
All of your above state a clear case of mental abuse/harassment.