Refactor and add register view