Externalize line of sight algorithm

Put math module and line of sight algorithm in the library
folder for the issue #1