added communication file and code clean-up