Cleaned up code.

Added self invoking function, uses === instead of ==.