Namespace the functions correctly, add needed params