Divided  functionality into separate files