Update Link.java

Made it a separate class