Bunch of tweaks and tests