Delete unused files and fix function table