Changed the browser setup to browser config and implemented the solution as a prototype class.