Modularized Code

Divided the main file into smaller more compact files and tabs.