Some fixes and todo