Code Overhaul

My portion of the code overhaul, adding the changes to make it more
extensible and the needed changes to the implemented classes.