Fixed writeToDB script
Fixed and cleaned files of getting info about building nums and writing the DB