New features

Added logs, db access and some business logic