Removed third party code for database layer to correct licensing issue,
Fixed "Ballooning log file" issue by correcting trim method.