Begin code overhaul. Converting code to more PERL based to be
crossplatform and use less external programs.