Updated error system, added comments