Implemented and pushed up a method in database

Changed database constructors, added serialize and deserialize to ranks