Minor tweaks and added new tests