Fixed wrong use of pointer/reference and const variables.
Changed vector type of direction from integer to double.
Added unittest for line object methods. Closes  #53.