   parse_args = (args) ->
     switch args.length
       when 1
-        _test_function = args[0]
+        test_function = args[0]
       when 2
-        _expects_method_name = args[0].expects_method_name
-        _mock_count = args[0].mock_count
-        _test_function = args[1]
-    _expects_method_name ?= "expects"
-    _mock_count ?= 5
+        expects_method_name = args[0].expects_method_name
+        mock_count = args[0].mock_count
+        test_function = args[1]
+    expects_method_name ?= "expects"
+    mock_count ?= 5
     # TODO: what happens if expects_method_name is not a legal method name?
     # TODO: what happens if mock_count is not a number?
 
   check_expects_method_name = ->
-    fail(messages.ExpectsMethodAlreadyExists, _expects_method_name) if Object.prototype[_expects_method_name]?
+    fail(messages.ExpectsMethodAlreadyExists, expects_method_name) if Object.prototype[expects_method_name]?
 
   install_expects_method = ->
-    Object.prototype[_expects_method_name] = new_ExpectsMethod(_expects_method_name, _mock_methods)
+    Object.prototype[expects_method_name] = new_ExpectsMethod(expects_method_name, mock_methods)
 
   uninstall_expects_method = ->
-    delete Object.prototype[_expects_method_name]
+    delete Object.prototype[expects_method_name]
 
   create_mock_objects = ->
-    _mock_objects = ( new MockObject() for i in [1.._mock_count] )
+    mock_objects = ( new MockObject() for i in [1..mock_count] )
 
   create_empty_mock_methods_list = ->
-    _mock_methods = new MockMethodList()    
+    mock_methods = new MockMethodList()    
   
   load_args(args)
   setup_environment()

#
mock = (args...) ->
  
  _test_function = undefined
  _expects_method_name = undefined
  _mock_count = undefined
  _mock_objects = undefined
  _mock_methods = undefined

  load_args = (args) ->
    check_usage(args)

    @_called = no

  args: (args...) ->
    check_args_usage(@, args)
    @_args = args
    @

  returns: (value) ->
    check_returns_usage(@, value, arguments.length)
    @_returns = value
    @

  throws: (error) ->
    check_throws_usage(@, error, arguments.length)
    @_throws = error
    @

