Changed checks to be more ruby-centric