Refactor code. Naming conversion, rubyish code and use better method

Please merge if you like :)

Thank you for releasing great plugin :+1: