refactor
Move cell padding to a function, dirname