Added exception class.
Removed the additional stack for local variable names.
Made it DRYer.
Changed visibility.