restruct core (prepare to make es5 extensions and prototype extension optional)