Move atm sample code out to a .rb file.