Restruct application - separate console part from index library