began restructuring code in the scratchpad dir