Changed to a better module pattern. Supports namespaces now.