Fixed RSpec 3 deprecation warnings
Improved code quality and documentation