Fundamentals Of Ion Sorption And Transport In Charged And Ligand Functionalized Membranes