Fix issues, improve configuration