Some bugfixes and attempting to use indentation,

to help handle the ruby case statement.