Trying to make it so accountcollections can be both linked and un-linked

Found and fixed some bugs in the process.