added notes table, changed some 1:n