fixed a few errors, renamed the global class initialization