Studies of Light-Matter Interactions in Atomic Ensembles for Creation of Entangled States and Quantum Interfaces