Modified Context handling for Controller retrieval and added comments.