adding missing classes and bug fixing