Added a lot of changes (sqlite wrapper and others)