Improve bam functionality.

Also did some package organization/commenting and added RUBY GC tuning
parameters.