wip - phpmd cleanning and bug fix