lib: added a simple test for the Error struct.
lib: initialize everything on start in a more clear way.
lib: polishing.