         pdbLoader.loadMoleculeForPath(pdbFile)
         self.title = pdbLoader.molecule.name
 
-        let cameraNode = SCNNode()
         cameraNode.camera = SCNCamera()
+        cameraNode.camera.zNear = 0.1
         cameraNode.position = SCNVector3(x: 0, y: 0, z: pdbLoader.molecule.maxN * 3)
         scene.rootNode.addChildNode(cameraNode)
  

        let scnView = self.view as SCNView
        scnView.scene = scene
        scnView.allowsCameraControl = true
        // scnView.showsStatistics = true
        scnView.backgroundColor = UIColor.blackColor()
        
        /* add a tap gesture recognizer
        let tapGesture = UITapGestureRecognizer(target: self, action: "handleTap:")
        let gestureRecognizers = NSMutableArray()
        gestureRecognizers.addObject(tapGesture)
        gestureRecognizers.addObjectsFromArray(scnView.gestureRecognizers)
        scnView.gestureRecognizers = gestureRecognizers
        */
    }
    
    @IBAction func renderModeChanged(sender: UISegmentedControl) {

        switch sender.selectedSegmentIndex {
        case 1:
            RenderFactory.createSticks(pdbLoader.molecule, molNode: molNode)
        case 2:
            RenderFactory.createCartoons(pdbLoader.molecule, molNode: molNode)
        default:
            RenderFactory.createBalls(pdbLoader.molecule, molNode: molNode, forceSize: 0.0)
        }
