Fixed DB bug & also finished basic configuration handling