add tests, lib folder to the consoleapp

@sethladd, add tests and a `lib/` folder to the console app.
why not just put this inside of main ?