File parsing

@sklum Can you review please?