Optimization of materials and interfaces for spintronic devices