Fix many bugs and have each file tracked