Fixed bug when not injecting $scope
bugfix: __options properties ignored
bugfix: options should be copied not reference
code cleanup and re-org