Refactored a bit, but couldn't extract boolean accessor logic into a module