Added filehandling

Added more stuff I don't have a clue about