Added status method. Cleaned up Ruby code.