Heavily Refactored