Separated console app from library

Separated functionality from UI