fix alot of bugs, db works, now log lines.