refactored stack and error-codes to be completely seperate
engine version 1.3.4