Refactor and more code