o merging in my changes from the refactored embedder branch milos, this has some stuff that we worked on so i've tried to unify everythign in trunk now