Moving code to separate library
Adding console example