Cleaned up the client, made modules smaller, used polymorphism.