even bigger rewrite. no more component dependencies, works with AMD, etc.