Refactored code into different files for easier reading

Started to implement different modes of operation.
Merge branch 'master' of github.com:Verox-/MSNSQL