Add VB.NET command line version
Clean up C# code a bit

Made it a bit more concise, tweaked a few bits here and there.
Remove variable from VB.NET

Function return value can be used directly.