Fixed persistence layer.

Added UpdateHandler class and connected it to the client class.
Generalized MySQLQuery class.