Refactored Database and Input references to use getInstance() calls.