Fixed Parser errors, implemented db api