Code simplifications and removal of deprecated functions such as counters
change rails version requirement