Writting to DB support. Part 1

Bot ready to release