BZ-10186: cleaned up some logic

Signed-off-by: Paden <padenportillo@gmail.com>