Added .rvmrc and Gemfile
Added agent
Refactored API into separate classes