Refactoring: moved Ruby files from rb folder to lib folder