Some more fixes and additions