die() removed, exceptions added, UnitTests refactored