Finished base db functionality, fixed ui