A lot of fixes, improved stability