Various changes
Refactored error system