removed silly database stuff
added log limits