The role of contacts and interfaces on the performance of perovskite solar cells