Misc finetuning, smaller bugs