Added teoria.js
Multiple improvements