Updated Database (Java)

Fixed bugs, made the database an object now rather than using static
methods. Test included.