Code for handling classes downloaded from server. Exceptions could be handled better.