Cleaned functions, removed excess variables, comments, functions. All usable code