refactor and more settings
something new
database works, mostly :)