Duplicating some functions. AKA doing bad stuff and I need to find one place to handle these functions.