Changed open() call and moved CSV import outside
Added function to separate features and labels