Finished with weight-sharing code -- mostly just needed to add specialized getters and setters for link.  With these simple additions, the same code can be used for shared and unshared weights.