Style tweaks and function renaming