throwing error when bad request occurs
added class to strip html tags, added api file to hadle main app logic