Refactor, custom proccssing and added factory for extract values