changed folder structure; moved file handling to seperate module