fixed segmentation fault in linux, still need to test with radio
removed some unused files