Refactor icontext