Added missing files and fixed rebuild script