Updated script to last version. Added new modules. Improved code style to be more standard