clean up .to_sym and self; format ruby