Changed class name references

and general coding style optimization