Some updates to logic