Remove unused functions; change tabs to spaces