Updates for SAM export

+ Initial work on organizations, activation keys, and content hosts (systems)
+ Some fixes for running on ruby-1.8.7
these giant blocks of code are extremely gross and hard to read.