Cleanup unnecessary checks in code