Implemented search into Logic.java.
- Fixes a bug whereby getCategory() == null breaking the application.