Fix various functionalities

Fix decimal numbers not working
Rewrite messaging
Add premature optimization
Add some comments
Save require returned table as local var