Adds obj.rb, code quality pass, improved logging