cleaned code
fixed code
added projection tool and projection tools ddir algorithms