Cleaning up function signature, small tweaks