Create gem spec, update dependencies
Rails3.2 compatibility
Remove init.rb
Replace some array's math with AR-relations