Improve init.py

Modify init.py
    add __name__ condition
    use data.dump_json()
    rename variable data -> config