small fixes and started database idea