Refactor based on feedback from pbays