Merge pull request #489 from seuros/master

Add counter cache #390
Removed duplicate code
Merge pull request #490 from seuros/duplicate

Removed duplicate code
Code clean up
Remove deprecation from spec_helper