partitioned code into more applicable modules renamed such if necessary.