Add support for json and http connections, changed lua modules