Topics In The Theory Of Small Josephson Junctions And Layered Superconductors