Back end: Started refactoring database usage. #109
Back end: Added InputExistsException. Started exception refactoring. #52.