Fix Build errors, remove duplicates