         if target
           @log("Checking if click event should be rendered")
           aTag = @findATag(target)
-          if @blog("- A tag", aTag) &&
-          @blog("- Left mouse button click", @leftMouseButton(event)) &&
-          @blog("- Not meta keys pressed", !@metakeyPressed(event)) &&
-          @blog("- Target attribute is current window", @targetAttributeIsCurrentWindow(aTag)) &&
-          @blog("- Link host same as current window", @targetHostSame(aTag))
+          if @checkIfOkToRender(event, aTag)
             href = aTag.attributes.href.nodeValue
             @log("Click event passed all checks")
             if !@pushStateSupport && @hashchangeSupport && @hashBaseUrl && @hashBaseUrl != window.location.pathname

  postExecutionListeners: []
  exceptionListeners: []
  debug: false
  log: =>
    if @debug && window.console && console && console.log
      if JSON.stringify
        console.log("ki-router: " + JSON.stringify(arguments))
      else
        console.log(arguments)
  add: (urlPattern, fn, metadata) =>
    @routes.push({route: new SinatraRouteParser(urlPattern), fn: fn, urlPattern: urlPattern, metadata: metadata})
  exec: (path) =>
    if matched = @find(path)
      @log("Found route for", path, " Calling function with params ", matched.params)

      throw new Error("addListener can not attach listeners!")

class SinatraRouteParser
constructor: (route) ->
    @keys = []
    route = route.substring(1)
    segments = []
