Added config file and controller feature. Moved to JSON for socket and config communication