Fixed build errors and missing files.