Add unit in table + remove unused code
Remove unused functions