Removed all but extension code, moving it to the root