Refactoring Metadata system + ExecutionContext

Try to simplify api and scheduler part