apo code clean-up & docu
improved documentaion