Polymer Chains and Networks in Narrow Slits