Refactoring to make it a prototype class and creating examples folder