Minor refactoring
Figured out how to use inject to remove temporary variable