Upgrade to betty 4.0.21.Final and clean code