Code refactor
some form changes
Logic for communication, code refactor