Refactor
This branch contains quite a big refactoring. Changes in archivation are because there were problems with database locking - the new version should be much more optimized in this matter. Overall, it should be more readable and clear. Also, some documentation attempt is added...