Add proctected column and refactored some things