Builds up the context properly