Database related code and image manipulation logic was removed from the ui class.