Removed unused code
Fixed a few API links