Major refactoring of assiciation handling. Now listener based.