Refactored Program.cs code into Scanner.cs

Moved a lot of code from Program to Scanner class in order to make
signature reading  / creation a bit easier.