cleaned up organization

so now there are separate files for reused functions