PSOM updates

Some updates and improvements to the PSOM's event handlers but there is
still something a little bit wrong with the way it learns.