Fixing a bug in the call of a static method. Cleaning up code.