Updating the API and added serialization support for rails.