Refactor and added few options