Fixed build errors and removed duplicate file