Modularizing code - NOT DONE