Modularized Code

Separated Lab 3 function into 3 main modules