added packet handling, registered GUI