Added Repository class.
Fixed incorrect return value.