changed matcher to match
[minor] comments and variable renames
assign prototype using object literal for readability