Added database builder
Fixed stackoverflow exception in handler initialization