Removed unused references

Corrected ambiguous types