Modular Basics

old code reformatted to be easier to manage