[TASK] Refactor the package

Removed unwanted code, comments and file. Minimized the code wherever possible

Related: #12683

Change-Id: I5235dbd7fbd0c911c32ec7fc4add402d69527ae0
[BUGFIX] Added content-type for captcha image