Added classes and fixed a bug