Update API to use standard ruby idioms