minor fixes and todo