cleaning up functions and variable names