reference library added.
library comment added.
not found bug fixed.
match parameter passing added.
add replace bang method, history_helper refactored.
fixed todo reference bug (regex), history association code is using ReferenceCheck now
change implementation (mixin to inheritance)
Merge branch 'master' into refactor/reference-lib

Conflicts:
	app/controllers/histories_controller.rb
	app/helpers/histories_helper.rb
Merge branch 'refactor/reference-lib'