A few changes and fixes