Changed .pop to [] to induce exception
Performance change + minor changes.

bool() is slower than is not None.