Fixed a few bugs and swapped in __CLASS__ for static method calls