Splitted application into library and application for easier maintenance;
Some refactoring;