Code restructuring, other gameplay improvements