Some fixes and some cosmetics