formatting, removing depracated code, and code consilidation