More or less complete assignment

commit prior to small refactoring and cleanup