Somehow pulled it together - two outstanding bugs