3.0.0 A3. Important bug fixes

* Some code cleaning too