database class improvements and dependency injection checked
delete or rename some files