reorderings and small fixes
none is now written as none, more compact code