Collision improved. Test cases added. program flow updated