refactored some stuff. Added a strict mode