Updated source file structure

Updated each function to an individual file