Refactor Database Class and update Database