basic lines detector
add Aijan's tree
refactor
add comments, fix bugs
small fixes